const fragment = document.createDocumentFragment()
for (let i = 0; i < 5; i++) {
    const li = document.createElement("li");
    li.appendChild(document.createTextNode("Item" + i));
    fragment.appendChild(li);
}
console.log(fragment)
document.getElementById("list").appendChild(fragment)